import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;
public class Shengri {
    public static void main(String[] args) {
        int nextDays = nextBirthday(1, 10, false);
        if (nextDays > 0) {
            System.out.println("离下个生日还有：" + nextDays);
        }
    }
    public static int nextBirthday(int month, int day, boolean incoludeToday) {
        Calendar thisYearBirthday = Calendar.getInstance();
        thisYearBirthday.set(Calendar.MONTH, month - 1);
        thisYearBirthday.set(Calendar.DAY_OF_MONTH, day);
        return daysOfTwo(new Date(), thisYearBirthday.getTime()) - (incoludeToday ? 1 : 0);
    }
    public static int daysOfTwo(Date fDate, Date oDate) {
        Calendar aCalendar = Calendar.getInstance();
        aCalendar.setTime(fDate);
        int day1 = aCalendar.get(Calendar.DAY_OF_YEAR);
        aCalendar.setTime(oDate);
        int day2 = aCalendar.get(Calendar.DAY_OF_YEAR);
        return day2 - day1;
    }
} 